/**
  ******************************************************************************
  * @file    Project/Application/Config/comm_def.h 
  * @author  Feirui_Joe
  * @version V0.1
  * @date    07/26/2010
  * @brief   common define for application. e.g. constant Data
  ******************************************************************************
  * @copy
  *
  * <h2><center>&copy; COPYRIGHT 2010 Feirui</center></h2>
  */ 

#ifndef  __COMM_DEF_H__
#define  __COMM_DEF_H__

#ifdef __cplusplus
 extern "C" {
#endif

/**
  * @brief "NULL" DEFINES
  */
#ifndef NULL
#define NULL ((void *)0)
#endif


/**
  * @brief STANDARD DEFINES
  */
#define  DEF_DISABLED                                      0
#define  DEF_ENABLED                                       !DEF_DISABLED

#define  DEF_FALSE                                         0
#define  DEF_TRUE                                          !DEF_FALSE

#define  DEF_NO                                            0
#define  DEF_YES                                           !DEF_NO

#define  DEF_OFF                                           0
#define  DEF_ON                                            !DEF_OFF

#define  DEF_CLR                                           0
#define  DEF_SET                                           !DEF_CLR

#define  DEF_ACTIVE                                        0
#define  DEF_INACTIVE                                      !DEF_ACTIVE

#define  DEF_FAIL                                          0
#define  DEF_OK                                            !DEF_FAIL

#define  DEF_CLOSE                                         0
#define  DEF_OPEN                                          !DEF_FALSE

/*********************BIT DEFINES***************************/
#define  DEF_BIT_NONE                                   0x00

#define  DEF_BIT_00                                     0x01
#define  DEF_BIT_01                                     0x02
#define  DEF_BIT_02                                     0x04
#define  DEF_BIT_03                                     0x08
#define  DEF_BIT_04                                     0x10
#define  DEF_BIT_05                                     0x20
#define  DEF_BIT_06                                     0x40
#define  DEF_BIT_07                                     0x80

#define  DEF_BIT_08                                   0x0100
#define  DEF_BIT_09                                   0x0200
#define  DEF_BIT_10                                   0x0400
#define  DEF_BIT_11                                   0x0800
#define  DEF_BIT_12                                   0x1000
#define  DEF_BIT_13                                   0x2000
#define  DEF_BIT_14                                   0x4000
#define  DEF_BIT_15                                   0x8000

#define  DEF_BIT_16                               0x00010000
#define  DEF_BIT_17                               0x00020000
#define  DEF_BIT_18                               0x00040000
#define  DEF_BIT_19                               0x00080000
#define  DEF_BIT_20                               0x00100000
#define  DEF_BIT_21                               0x00200000
#define  DEF_BIT_22                               0x00400000
#define  DEF_BIT_23                               0x00800000

#define  DEF_BIT_24                               0x01000000
#define  DEF_BIT_25                               0x02000000
#define  DEF_BIT_26                               0x04000000
#define  DEF_BIT_27                               0x08000000
#define  DEF_BIT_28                               0x10000000
#define  DEF_BIT_29                               0x20000000
#define  DEF_BIT_30                               0x40000000
#define  DEF_BIT_31                               0x80000000

#define  DEF_BIT_32                               0x0100000000
#define  DEF_BIT_33                               0x0200000000
#define  DEF_BIT_34                               0x0400000000
#define  DEF_BIT_35                               0x0800000000
#define  DEF_BIT_36                               0x1000000000
#define  DEF_BIT_37                               0x2000000000
#define  DEF_BIT_38                               0x4000000000
#define  DEF_BIT_39                               0x8000000000

/* Timer base setting */
#define SYSAPB1CLK_FREQ                        ((uint32_t)36000000)
#define SYSAPB2CLK_FREQ                        ((uint32_t)72000000)
#define SYSTIM2T7CLK_FREQ                      ((uint32_t)72000000)
#define SYSTIM1N8CLK_FREQ                      ((uint32_t)72000000)


/* Main is Available in This Product */
#define ModuleMode_LXC6620B       36
#define ModuleMode_LXC6610B       37

/* Language Option */
#define StringTableType          uint16_t


/* Module Option */
#if   defined(Module6610)                                    /* Module6610B */
  #define ModuleVersionVal  ModuleMode_LXC6610B
  #define ModuleStringChar  ' ',' ',' ','6','6','1','0','B'
#elif defined(Module6620)                                    /* Module6620B */
  #define ModuleVersionVal  ModuleMode_LXC6620B
  #define ModuleStringChar  ' ',' ',' ','6','6','2','0','B'
  #define ProductMainAvailableOpt
  #define ProductTestModeAvailOpt
#endif

/* SW Version */
//#if   defined(SWVersion_1000) 
//#define SoftwareVersionVal  1000
//#elif defined(SWVersion_1001) 
//#define SoftwareVersionVal  1001
//#endif


#ifdef __cplusplus
}
#endif

#endif	/*	__COMM_DEF_H__	*/
